<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Role extends Model
{
    use HasFactory;

    protected $table = 'role';

    protected $guarded = [];

    protected $primaryKey = 'id';

    public $timestamps = false;

    // 权限
    public function permission() {
    	return $this->belongsToMany('App\Models\Permission','role_permission','r_id','p_id');
    }
}
